home *** CD-ROM | disk | FTP | other *** search
/ Hyper Stacks 1994 May / Hyper Stacks (Pacific HiTech)(1994)[Mac].iso / Math / trigHype™ / card_9233.txt < prev    next >
Encoding:
Text File  |  1991-03-17  |  4.5 KB  |  218 lines

  1. -- card: 9233 from stack: in
  2. -- bmap block id: 9660
  3. -- flags: 4000
  4. -- background id: 7184
  5. -- name: C,a,b known
  6. ----- HyperTalk script -----
  7. on mouseUp
  8.   set numberFormat to <0.000000>
  9.  
  10.   --Calculate Sin C
  11.   get sin(card field "angle C"*(pi/180))
  12.   put it into mem1
  13.   put it into card field "sin C"
  14.  
  15.   --Calculate Cos C
  16.   get cos(card field "angle C"*(pi/180))
  17.   put it into mem2
  18.   put it into card field "cos C"
  19.  
  20.   --Calculate Tan A
  21.   get (card field "side a"*mem1)/ (card field "side b"-card field "side a"*mem2)
  22.   put it into mem3
  23.   put it into card field "tan A"
  24.  
  25.   --Calculate Angle A
  26.   get atan(mem3)*(180/pi)
  27.   put it into mem4
  28.   put it into card field "angle A"
  29.  
  30.   --Calculate Angle B
  31.   get 180-(card field "angle C"+ card field "angle A")
  32.   put it into card field "angle B"
  33.  
  34.   --Calculate Side C
  35.   get sqrt((card field "side a"^2+card field "side b"^2) -2*(card field "side a"*card field "side b"*mem2))
  36.   put it into card field "side c"
  37.  
  38.   --Calculate Area
  39.   get (card field "side a"+card field "side b"+card field "side c")/2
  40.   put it into mem9
  41.   get sqrt(mem9*(mem9-card field "side a")*(mem9-card field "side b") *(mem9-card field "side c"))
  42.   put it into bkgnd field "Area"
  43.  
  44.   --Calculate Perimeter
  45.   get card field "side a"+card field "side b"+card field "side c"
  46.   put it into bkgnd field "Perimeter"
  47. end mouseUp
  48.  
  49.  
  50. -- part 1 (field)
  51. -- low flags: 00
  52. -- high flags: 0002
  53. -- rect: left=112 top=263 right=280 bottom=240
  54. -- title width / last selected line: 0
  55. -- icon id / first selected line: 0 / 0
  56. -- text alignment: 1
  57. -- font id: 3
  58. -- text size: 12
  59. -- style flags: 0
  60. -- line height: 16
  61. -- part name: side b
  62.  
  63.  
  64. -- part 2 (field)
  65. -- low flags: 00
  66. -- high flags: 0002
  67. -- rect: left=305 top=146 right=163 bottom=433
  68. -- title width / last selected line: 0
  69. -- icon id / first selected line: 0 / 0
  70. -- text alignment: 1
  71. -- font id: 3
  72. -- text size: 12
  73. -- style flags: 0
  74. -- line height: 16
  75. -- part name: side a
  76.  
  77.  
  78. -- part 3 (field)
  79. -- low flags: 01
  80. -- high flags: 0004
  81. -- rect: left=245 top=82 right=101 bottom=373
  82. -- title width / last selected line: 0
  83. -- icon id / first selected line: 0 / 0
  84. -- text alignment: 1
  85. -- font id: 3
  86. -- text size: 12
  87. -- style flags: 256
  88. -- line height: 16
  89. -- part name: angle B
  90.  
  91.  
  92. -- part 4 (field)
  93. -- low flags: 01
  94. -- high flags: 0004
  95. -- rect: left=51 top=135 right=154 bottom=184
  96. -- title width / last selected line: 0
  97. -- icon id / first selected line: 0 / 0
  98. -- text alignment: 1
  99. -- font id: 3
  100. -- text size: 12
  101. -- style flags: 256
  102. -- line height: 16
  103. -- part name: side c
  104.  
  105.  
  106. -- part 5 (field)
  107. -- low flags: 01
  108. -- high flags: 0004
  109. -- rect: left=22 top=215 right=234 bottom=150
  110. -- title width / last selected line: 0
  111. -- icon id / first selected line: 0 / 0
  112. -- text alignment: 1
  113. -- font id: 3
  114. -- text size: 12
  115. -- style flags: 256
  116. -- line height: 16
  117. -- part name: angle A
  118.  
  119.  
  120. -- part 7 (field)
  121. -- low flags: 00
  122. -- high flags: 0002
  123. -- rect: left=297 top=215 right=232 bottom=425
  124. -- title width / last selected line: 0
  125. -- icon id / first selected line: 0 / 0
  126. -- text alignment: 1
  127. -- font id: 3
  128. -- text size: 12
  129. -- style flags: 0
  130. -- line height: 16
  131. -- part name: angle C
  132.  
  133.  
  134. -- part 8 (field)
  135. -- low flags: 01
  136. -- high flags: 0001
  137. -- rect: left=422 top=50 right=62 bottom=482
  138. -- title width / last selected line: 0
  139. -- icon id / first selected line: 0 / 0
  140. -- text alignment: 0
  141. -- font id: 3
  142. -- text size: 9
  143. -- style flags: 0
  144. -- line height: 12
  145. -- part name: sin C
  146.  
  147.  
  148. -- part 9 (field)
  149. -- low flags: 01
  150. -- high flags: 0001
  151. -- rect: left=422 top=63 right=75 bottom=482
  152. -- title width / last selected line: 0
  153. -- icon id / first selected line: 0 / 0
  154. -- text alignment: 0
  155. -- font id: 3
  156. -- text size: 9
  157. -- style flags: 0
  158. -- line height: 12
  159. -- part name: cos C
  160.  
  161.  
  162. -- part 10 (field)
  163. -- low flags: 01
  164. -- high flags: 0001
  165. -- rect: left=422 top=76 right=88 bottom=482
  166. -- title width / last selected line: 0
  167. -- icon id / first selected line: 0 / 0
  168. -- text alignment: 0
  169. -- font id: 3
  170. -- text size: 9
  171. -- style flags: 0
  172. -- line height: 12
  173. -- part name: tan A
  174.  
  175.  
  176. -- part contents for card part 1
  177. ----- text -----
  178. 3
  179.  
  180. -- part contents for card part 2
  181. ----- text -----
  182. 2
  183.  
  184. -- part contents for card part 7
  185. ----- text -----
  186. 104.477513
  187.  
  188. -- part contents for card part 8
  189. ----- text -----
  190. 0.968246
  191.  
  192. -- part contents for card part 9
  193. ----- text -----
  194. -.250000
  195.  
  196. -- part contents for card part 10
  197. ----- text -----
  198. 0.553283
  199.  
  200. -- part contents for card part 5
  201. ----- text -----
  202. 28.955024
  203.  
  204. -- part contents for card part 3
  205. ----- text -----
  206. 46.567463
  207.  
  208. -- part contents for card part 4
  209. ----- text -----
  210. 4.000000
  211.  
  212. -- part contents for background part 3
  213. ----- text -----
  214. 9.000000
  215.  
  216. -- part contents for background part 5
  217. ----- text -----
  218. 2.904738